<?php

require_once '../datos/aportesDA.php';
require_once '../datos/prestamosDA.php';
require_once '../datos/interesesDA.php';
require_once 'smarty.php';
$totalAportes = cargarTotalAportes();
$totalPrestamos = cargarTotalPrestamos();
$totalInteresesPagados = cargarTotalIntereses(1);
$totalInteresesPendientes = cargarTotalIntereses(0);
$smarty->assign("totalAportes", number_format($totalAportes,0,',','.'));
$smarty->assign("totalPrestamos", number_format($totalPrestamos,0,',','.'));
$smarty->assign("totalInteresesPagados", number_format($totalInteresesPagados,0,',','.'));
$smarty->assign("totalInteresesPendientes", number_format($totalInteresesPendientes,0,',','.'));
$smarty->assign("capital", number_format(($totalAportes-$totalPrestamos+$totalInteresesPagados),0,',','.'));
$smarty->display("capital.tpl");
?>
